package com.xauto.pioneer.appuser.model;

import org.json.JSONObject;

/**订单列表模型
 * Created by Ellis.Li on 2017/5/12.
 */
public class ParkingOrderInfo extends BaseModel<ParkingOrderInfo> {
    /** 停车位置*/
    public String parking_order_location;
    /** 停车价格*/
    public String parking_order_price;
    /** 停车车牌*/
    public String parking_order_carnum;
    /** 停车时长*/
    public String parking_order_time;
    /** 停车起始*/
    public String parking_order_start;
    /** 停车最终*/
    public String parking_order_end;




    /** 停车订单ID*/
    public String parking_order_id;
    /** 停车订单编号*/
    public String parking_order_no;
    /** 停车订单状态ID*/
    public String parking_order_status_id;
    /** 停车订单状态名称*/
    public String parking_order_status_name;
    /** 停车订单状态显示名称*/
    public String parking_order_status_display_name;
    /** 总计*/
    public String total_amount;
    /** 格式化(10.00元)*/
    public String total_amount_format;
    /** 附件信息(1-是/0-否)*/
    public String is_extend_info;
    /** 订单时间(unix_time)*/
    public String order_time;
    /** 订单时间(格式化)*/
    public String order_time_format;
//
    @Override
    public ParkingOrderInfo parse(JSONObject jsonObject) {
        if(jsonObject != null) {
            parking_order_location = jsonObject.optString("parking_order_location");
            parking_order_price = jsonObject.optString("parking_order_price");
            parking_order_carnum = jsonObject.optString("parking_order_carnum");
            parking_order_time = jsonObject.optString("parking_order_time");
            parking_order_start = jsonObject.optString("parking_order_start");
            parking_order_end = jsonObject.optString("parking_order_end");

//            parking_order_id = jsonObject.optString("car_order_id");
//            car_order_no = jsonObject.optString("car_order_no");
//            car_order_status_id = jsonObject.optString("car_order_status_id");
//            car_order_status_name = jsonObject.optString("car_order_status_name");
//            car_order_status_display_name = jsonObject.optString("car_order_status_display_name");
//            total_amount = jsonObject.optString("total_amount");
//            total_amount_format = jsonObject.optString("total_amount_format");
//            is_extend_info = jsonObject.optString("is_extend_info");
//            order_time = jsonObject.optString("order_time");
//            order_time_format = jsonObject.optString("order_time_format");
            return this;
        }
        return null;
    }
}
